﻿#ifndef FCOMBOBOX_H
#define FCOMBOBOX_H

#include <QComboBox>
#include <QPropertyAnimation>

class FComboBox : public QComboBox
{
    Q_OBJECT
    Q_PROPERTY(qreal arrowAngle READ arrowAngle WRITE setArrowAngle)

public:
    explicit FComboBox(QWidget *parent = nullptr);
    qreal arrowAngle() const;
    void setArrowAngle(qreal v);

protected:
    void showPopup() override;
    void hidePopup() override;
    void paintEvent(QPaintEvent *event) override;
    void animateTo(qreal target);

private:
    qreal m_angle = 0;
    QPropertyAnimation* m_anim;

};

#endif // FCOMBOBOX_H
